package org.liuhy.line
{
	import flash.events.MouseEvent;
	
	import mx.events.DragEvent;
	
	import org.liuhy.node.focus.FocusNode;	
	public class ArrowLineNode extends LineNode
	{
		public function ArrowLineNode(p_x:int,p_y:int)
		{
			super(p_x,p_y);
			this.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
			this.addEventListener(MouseEvent.MOUSE_DOWN,onClick);
		}
		override public function lineNodeDrop(event:DragEvent):void{
			super.lineNodeDrop(event);			
			var _line:AbstractLine = event.dragSource.dataForFormat("line") as AbstractLine;
			_line.arrowNodeAdjustLine(event);
		}
		override public function lineNodeVirtualDrag(event:DragEvent):void{
			var _line:AbstractLine = event.dragSource.dataForFormat("line") as AbstractLine;
			_line.arrowNodeAdjustVirtualLine(event);
		}
		override public function lineNodeFocusVirtualDrag(event:DragEvent):void{
			var _line:AbstractLine = event.dragSource.dataForFormat("line") as AbstractLine;
			_line.arrowNodeFocusAdjustVirtualLine(event.currentTarget as FocusNode);
		}
	}
}